#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
const ll N = 1e5+10;
ll e[N], ne[N], idx, h[N];
ll n, m;
ll d[N];
void add(ll a,ll b)
{
    e[idx]=b;
    ne[idx]=h[a];
    h[a] = idx++;
}
void topsort()
{
    vector<ll> ans;
    queue<ll> q;
    for(ll i=1;i<=n;i++)
    {
        if(d[i]==0)
        {
            q.push(i);
        }
    }
    while(!q.empty())
    {
        auto now=q.front();
        ans.push_back(now);
        q.pop();
        for (ll i = h[now]; i != -1;i=ne[i])
        {
            int nex=e[i];
            d[nex]--;
            if(d[nex]==0)
            {
                q.push(nex);
            }
        }
    }
    if(ans.size()==n)
    {
        for(auto & i:ans)
        {
            cout<<i<<" ";
        }
    }
    else {
        cout << -1 << endl;
    }
}
void solve()
{
    memset(h,-1,sizeof h);
    cin >> n >> m;
    for (ll i = 1; i <= m;i++)
    {
        ll a,b;
        cin >> a >> b;
        add(a, b);
        d[b]++;
    }
    topsort();
}
int main()
{
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
